In performing an arithmetical operation such as integration by use of a digital differential analyzer, fixed point arithmetic methods have heretofore been employed because these methods make it possible to reduce the amount of hardware required, and this inevitably leads to reduction in the cost of the apparatus.
In accordance with fixed point arithmetical methods, all operations take place in an invariant manner without consideration of the location of the radix point. This is illustrated by certain desk calculation and by slide rules, with which the operation must keep track of the decimal point. Thus, all variables that are to be processed by an arithmetical unit, such as an integrator, on the basis of fixed-point arithmetic, must be scaled. That is, the operands and the results of all arithmetic operations must be properly aligned so as to have a magnitude between certain fixed values. In the same way as in an analog computer, this scaling is an extremely-complicated job to be carried out manually, and since the scaling coefficients are based on a predicted or forecasted maximum values of the variables, the results of the arithmetical operation often contain critical errors if the predicted or forecasted values are not accurate.
Furthermore, because the dynamic range of the variables is narrowed in fixed point arithmetical methods, it is not so easy to adapt these methods to ordinary scientific technological calculation.
For the foregoing reasons, the use of floating point arithmetic is desirable, even though in adapting floating point methods to a digital differential analyzer, a greater number of memory and control devices are required than would be needed if fixed point arithmetic were used. As an example of a system which adopts floating point arithmetic to a differential digital analyzer, reference is made to Japanese Patent Laid-Open No. 25148/1975 (laid-open on Mar. 17, 1975), which describes a technique for the solution of differential equations, employing floating point arithmetic. The principal arithmetical unit of the differential digital analyzer disclosed in this publication is an integrator which performs the arithmetic operation and produces the integrated value through solution of the following difference equations: ##EQU3## where i is an integration number; n is an input number; Y is the integrand; .DELTA.Y is the increment of the input variable; R is the residue of the integrated value of the integrand; K is a constant; .DELTA.X is the increment of the independent variable; and .DELTA.Z is the output increment (carry) of the integrated value.
Referring to Equation (1), if we let ##EQU4## Then R.sub.i in Equation (1) can be expressed as: EQU R.sub.i =BR1+BR2-.DELTA.Z.sub.i ( 3)
Each of the three terms in Equation (3) may be expressed in floating point (mantissa-and-exponent) form, base two, as follows: ##EQU5## where the letter "M" indicates a mantissa term and the letter "E" denotes an exponent term.
Of course, in determining R.sub.i, before BR1M and BR2M may be added in the process of obtaining BR1+BR2 in accordance with Equation (3), their radix points must be aligned by shifting the radix point of the mantissa of the term having the smaller exponent to the left by a number of places equal to the difference of the two exponents, for example, unless the exponents BR1E and BR2E are equal. This requires a comparison of the two exponents and then a shifting of the radix point of one mantissa by a quantity corresponding to the difference. An example in decimal notation may be helpful to understand this operation. To add 2.0.times.10.sup.2 to 5.0.times.10.sup.3, the decimal (radix) point of the first term is shifted left so we have 0.2.times.10.sup.3, which may be summed with 5.0.times.10.sup.3 to obtain 5.2.times.10.sup.3.
In the cited laid-open application, .DELTA.Z is then calculated as follows:
.DELTA.Z.sub.E is set equal to BR1E or BR2E, whichever is greater. .DELTA.Z.sub.M is set equal to one, zero or minus one depending on the result of the addition of BR1 and BR2. When the sum of the mantissa (BR1M+BR2M) exceeds unity, an overflow condition occurs, and .DELTA.Z.sub.M =1.0. When the sum is negative, .DELTA.Z.sub.M =-1.0. When the sum is greater than or equal to zero but less than unity, .DELTA.Z.sub.M =0.0. If this is the case .DELTA.Z will be zero and further calculation will not improve the accuracy of the numerical solution. This is the disadvantage of the approach of Japanese Laid-Open No. 25148/1975 which is overcome by the present invention.